package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysUserAddressMapper;
import com.ruoyi.system.domain.SysUserAddress;
import com.ruoyi.system.service.ISysUserAddressService;

/**
 * 会员收货地址Service业务层处理
 * 
 * @author rey
 * @date 2022-10-25
 */
@Service
public class SysUserAddressServiceImpl implements ISysUserAddressService 
{
    @Autowired
    private SysUserAddressMapper sysUserAddressMapper;

    /**
     * 查询会员收货地址
     * 
     * @param id 会员收货地址主键
     * @return 会员收货地址
     */
    @Override
    public SysUserAddress selectSysUserAddressById(Long id)
    {
        return sysUserAddressMapper.selectSysUserAddressById(id);
    }

    /**
     * 查询会员收货地址列表
     * 
     * @param sysUserAddress 会员收货地址
     * @return 会员收货地址
     */
    @Override
    public List<SysUserAddress> selectSysUserAddressList(SysUserAddress sysUserAddress)
    {
        return sysUserAddressMapper.selectSysUserAddressList(sysUserAddress);
    }

    /**
     * 新增会员收货地址
     * 
     * @param sysUserAddress 会员收货地址
     * @return 结果
     */
    @Override
    public int insertSysUserAddress(SysUserAddress sysUserAddress)
    {
        return sysUserAddressMapper.insertSysUserAddress(sysUserAddress);
    }

    /**
     * 修改会员收货地址
     * 
     * @param sysUserAddress 会员收货地址
     * @return 结果
     */
    @Override
    public int updateSysUserAddress(SysUserAddress sysUserAddress)
    {
        return sysUserAddressMapper.updateSysUserAddress(sysUserAddress);
    }

    /**
     * 批量删除会员收货地址
     * 
     * @param ids 需要删除的会员收货地址主键
     * @return 结果
     */
    @Override
    public int deleteSysUserAddressByIds(Long[] ids)
    {
        return sysUserAddressMapper.deleteSysUserAddressByIds(ids);
    }

    /**
     * 删除会员收货地址信息
     * 
     * @param id 会员收货地址主键
     * @return 结果
     */
    @Override
    public int deleteSysUserAddressById(Long id)
    {
        return sysUserAddressMapper.deleteSysUserAddressById(id);
    }
}
